<%@ page import="mindmap.*"
%><%@ page import="java.io.PrintWriter"
%><%@ page contentType="text/html;charset=UTF-8"
%><%@ page import="java.sql.*"
%><%@ page import="java.util.*"
%><%@ page import="java.lang.*"%><%


mindmap.ObjectDB db = new mindmap.ObjectDB();

try{
	db.initialiseConnexion();
	mindmap.Json json = new mindmap.Json(
		Project.getAll(db.getStatement()), 
		Epic.getAll(db.getStatement()),
		UserStory.getAll(db.getStatement()),
		Scenario.getAll(db.getStatement())
	); 
	out.print(json.toJson());
	
	db.closeConnexion();
}catch(Exception e){
	response.setStatus(500,e.getLocalizedMessage());	
}
%>